package com.voicechat.firstmet.bean;

import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @ProjectName: FirstMet
 * @Package: com.voicechat.firstmet.bean
 * @ClassName: CommBean
 * @Description: 社区热门数据
 * @Author: ljp
 * @CreateDate: 2018/9/4 14:25
 * @Version: 1.0
 */
public class CommBean{

    /**
     * code : 200
     * msg : 成功
     * map : {"realTime":[{"id":"asdasd","isNewRecord":false,"hotId":"d3611093491141cfb8e1b43692e5d3b6","type":"1","userId":"d3611093491141cfb8e1b43692e5d3b6","avatarUrl":"head/64121538037382.jpg","nickName":"ss是😍但是","gender":1,"birthday":"1998-10-02"}],"advertisement":[{"id":"ccc","isNewRecord":false,"remarks":"","hotId":"","type":"4","title":"滚动图","url":"http://t2.hddhhn.com/uploads/tu/201707/200/4.jpg"},{"id":"ddd","isNewRecord":false,"type":"4","title":"滚动图","url":"http://t2.hddhhn.com/uploads/tu/201707/200/9.jpg"},{"id":"sss","isNewRecord":false,"remarks":"","hotId":"","type":"4","title":"滚动图","url":"http://t2.hddhhn.com/uploads/tu/201707/200/5.jpg"}],
     * "timeInterval":[{"id":"bbb","isNewRecord":false,"hotId":"","type":"3","title":"广告位","url":"http://广告"}],
     * "dynamic":[{"id":"aaaaa","isNewRecord":false,"hotId":"4235e77f458841e29445aab7feccce17","type":"2","mdTitle":"感觉自己美美哒","content":"照片","mdUpdateDate":1537412587000,"userId":"f68b3c28db3c41d795b34268aef3b68a","avatarUrl":"head/58241538036271658.jpg","nickName":"😁","gender":2,"birthday":"1998.09.27","fabulousCount":1,"discussCount":1,"isFabulous":"1"}]}
     */

    private int code;
    private String msg;
    private MapBean map;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public MapBean getMap() {
        return map;
    }

    public void setMap(MapBean map) {
        this.map = map;
    }

    public static class MapBean {
        private List<RealTimeBean> realTime;//实时推荐主播数据
        private List<AdvertisementBean> advertisement;//广告位
        private List<TimeIntervalBean> timeInterval;//滚动图banner
        private List<DynamicBean> dynamic;//热门帖子数据

        public List<RealTimeBean> getRealTime() {
            return realTime;
        }

        public void setRealTime(List<RealTimeBean> realTime) {
            this.realTime = realTime;
        }

        public List<AdvertisementBean> getAdvertisement() {
            return advertisement;
        }

        public void setAdvertisement(List<AdvertisementBean> advertisement) {
            this.advertisement = advertisement;
        }

        public List<TimeIntervalBean> getTimeInterval() {
            return timeInterval;
        }

        public void setTimeInterval(List<TimeIntervalBean> timeInterval) {
            this.timeInterval = timeInterval;
        }

        public List<DynamicBean> getDynamic() {
            return dynamic;
        }

        public void setDynamic(List<DynamicBean> dynamic) {
            this.dynamic = dynamic;
        }

        public static class RealTimeBean {
            /**
             * id : asdasd
             * isNewRecord : false
             * hotId : d3611093491141cfb8e1b43692e5d3b6
             * type : 1
             * userId : d3611093491141cfb8e1b43692e5d3b6
             * avatarUrl : head/64121538037382.jpg
             * nickName : ss是😍但是
             * gender : 1
             * birthday : 1998-10-02
             */

            private String id;
            private boolean isNewRecord;
            private String hotId;
            private String type;//热门类型
            private String userId;//主播id
            private String avatarUrl;//图像地址
            private String nickName;//昵称
            private int gender;//性别
            private String birthday;//生日

            private Bitmap bitmap;//主播头像

            public boolean isNewRecord() {
                return isNewRecord;
            }

            public void setNewRecord(boolean newRecord) {
                isNewRecord = newRecord;
            }

            public Bitmap getBitmap() {
                return bitmap;
            }

            public void setBitmap(Bitmap bitmap) {
                this.bitmap = bitmap;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public boolean isIsNewRecord() {
                return isNewRecord;
            }

            public void setIsNewRecord(boolean isNewRecord) {
                this.isNewRecord = isNewRecord;
            }

            public String getHotId() {
                return hotId;
            }

            public void setHotId(String hotId) {
                this.hotId = hotId;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public String getUserId() {
                return userId;
            }

            public void setUserId(String userId) {
                this.userId = userId;
            }

            public String getAvatarUrl() {
                return avatarUrl;
            }

            public void setAvatarUrl(String avatarUrl) {
                this.avatarUrl = avatarUrl;
            }

            public String getNickName() {
                return nickName;
            }

            public void setNickName(String nickName) {
                this.nickName = nickName;
            }

            public int getGender() {
                return gender;
            }

            public void setGender(int gender) {
                this.gender = gender;
            }

            public String getBirthday() {
                return birthday;
            }

            public void setBirthday(String birthday) {
                this.birthday = birthday;
            }
        }

        public static class AdvertisementBean {
            /**
             * id : ccc
             * isNewRecord : false
             * remarks :
             * hotId :
             * type : 4
             * title : 滚动图
             * url : http://t2.hddhhn.com/uploads/tu/201707/200/4.jpg
             */

            private String id;
            private boolean isNewRecord;
            private String remarks;//h5:"1"  金币充值："2"  会员购买："3"  热门帖子："4"
            private String hotId;
            private String type;//热门类型
            private String title;//banner 标题
            private String url;// 广告图片地址
            private String h5Url;               // H5地址


            public String getH5Url() {
                return h5Url;
            }

            public void setH5Url(String h5Url) {
                this.h5Url = h5Url;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public boolean isIsNewRecord() {
                return isNewRecord;
            }

            public void setIsNewRecord(boolean isNewRecord) {
                this.isNewRecord = isNewRecord;
            }

            public String getRemarks() {
                return remarks;
            }

            public void setRemarks(String remarks) {
                this.remarks = remarks;
            }

            public String getHotId() {
                return hotId;
            }

            public void setHotId(String hotId) {
                this.hotId = hotId;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }
        }

        public static class TimeIntervalBean {
            /**
             * id : bbb
             * isNewRecord : false
             * hotId :
             * type : 3
             * title : 广告位
             * url : http://广告
             */

            private String id;
            private boolean isNewRecord;
            private String hotId;
            private String type;//热门类型
            private String title;//标题
            private String url;//banner图片地址
            private String h5Url;               // H5地址
            private String remarks;//h5:"1"  金币充值："2"  会员购买："3"  热门帖子："4"

            public String getRemarks() {
                return remarks;
            }
            public void setRemarks(String remarks) {
                this.remarks = remarks;
            }
            public String getH5Url() {
                return h5Url;
            }

            public void setH5Url(String h5Url) {
                this.h5Url = h5Url;
            }
            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public boolean isIsNewRecord() {
                return isNewRecord;
            }

            public void setIsNewRecord(boolean isNewRecord) {
                this.isNewRecord = isNewRecord;
            }

            public String getHotId() {
                return hotId;
            }

            public void setHotId(String hotId) {
                this.hotId = hotId;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }
        }

        public static class DynamicBean implements Parcelable{
            /**
             * id : aaaaa
             * isNewRecord : false
             * hotId : 4235e77f458841e29445aab7feccce17
             * type : 2
             * mdTitle : 感觉自己美美哒
             * content : 照片
             * mdUpdateDate : 1537412587000
             * userId : f68b3c28db3c41d795b34268aef3b68a
             * avatarUrl : head/58241538036271658.jpg
             * nickName : 😁
             * gender : 2
             * birthday : 1998.09.27
             * fabulousCount : 1
             * discussCount : 1
             * isFabulous : 1
             */

            private String id;
            private boolean isNewRecord;
            private String hotId;
            private String type;//热门类型
            private String mdTitle;//帖子标题
            private String content;//帖子内容
            private String updateDate;//发帖时间
            private String userId;//用户id
            private String avatarUrl;//图像地址
            private String nickName;//用户昵称
            private int gender;//性别    1男 2女
            private String birthday;//生日
            private int fabulousCount;//点赞数
            private int discussCount;//评论数
            private String isFabulous;//我是否点赞  1 已经点赞 0  未点赞
            private String vType;//vip等级   1 月 2 年 0 不是会员
            private String uType;//  1 普通用户 2主播
            private String url;//图片地址
            private String warrant;              // 授权评论 1默认 2不允许评论
            private String isFollow;// 关注状态  1未关注 0关注
            private String  voiceUrl;             // 录音地址
            private int  duration;             // 语音时长
            protected DynamicBean(Parcel in) {
                id = in.readString();
                isNewRecord = in.readByte() != 0;
                hotId = in.readString();
                type = in.readString();
                mdTitle = in.readString();
                content = in.readString();
                updateDate = in.readString();
                userId = in.readString();
                avatarUrl = in.readString();
                nickName = in.readString();
                gender = in.readInt();
                birthday = in.readString();
                fabulousCount = in.readInt();
                discussCount = in.readInt();
                isFabulous = in.readString();
                vType = in.readString();
                uType = in.readString();
                url = in.readString();
                warrant = in.readString();
                isFollow = in.readString();
                voiceUrl = in.readString();
                duration = in.readInt();
            }

            public static final Creator<DynamicBean> CREATOR = new Creator<DynamicBean>() {
                @Override
                public DynamicBean createFromParcel(Parcel in) {
                    return new DynamicBean(in);
                }

                @Override
                public DynamicBean[] newArray(int size) {
                    return new DynamicBean[size];
                }
            };

            public String getVoiceUrl() {
                return voiceUrl;
            }

            public void setVoiceUrl(String voiceUrl) {
                this.voiceUrl = voiceUrl;
            }

            public int getDuration() {
                return duration;
            }

            public void setDuration(int duration) {
                this.duration = duration;
            }

            public String getWarrant() {
                return warrant;
            }

            public void setWarrant(String warrant) {
                this.warrant = warrant;
            }

            public String getIsFollow() {
                return isFollow;
            }

            public void setIsFollow(String isFollow) {
                this.isFollow = isFollow;
            }

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }

            public boolean isNewRecord() {
                return isNewRecord;
            }

            public void setNewRecord(boolean newRecord) {
                isNewRecord = newRecord;
            }

            public String getvType() {
                return vType;
            }

            public void setvType(String vType) {
                this.vType = vType;
            }

            public String getuType() {
                return uType;
            }

            public void setuType(String uType) {
                this.uType = uType;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }
            public String getHotId() {
                return hotId;
            }

            public void setHotId(String hotId) {
                this.hotId = hotId;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public String getMdTitle() {
                return mdTitle;
            }

            public void setMdTitle(String mdTitle) {
                this.mdTitle = mdTitle;
            }

            public String getContent() {
                return content;
            }

            public void setContent(String content) {
                this.content = content;
            }

            public String getMdUpdateDate() {
                return updateDate;
            }

            public void setMdUpdateDate(String mdUpdateDate) {
                this.updateDate = mdUpdateDate;
            }

            public String getUserId() {
                return userId;
            }

            public void setUserId(String userId) {
                this.userId = userId;
            }

            public String getAvatarUrl() {
                return avatarUrl;
            }

            public void setAvatarUrl(String avatarUrl) {
                this.avatarUrl = avatarUrl;
            }

            public String getNickName() {
                return nickName;
            }

            public void setNickName(String nickName) {
                this.nickName = nickName;
            }

            public int getGender() {
                return gender;
            }

            public void setGender(int gender) {
                this.gender = gender;
            }

            public String getBirthday() {
                return birthday;
            }

            public void setBirthday(String birthday) {
                this.birthday = birthday;
            }

            public int getFabulousCount() {
                return fabulousCount;
            }

            public void setFabulousCount(int fabulousCount) {
                this.fabulousCount = fabulousCount;
            }

            public int getDiscussCount() {
                return discussCount;
            }

            public void setDiscussCount(int discussCount) {
                this.discussCount = discussCount;
            }

            public String getIsFabulous() {
                return isFabulous;
            }

            public void setIsFabulous(String isFabulous) {
                this.isFabulous = isFabulous;
            }

            @Override
            public String toString() {
                return "DynamicBean{" +
                        "id='" + id + '\'' +
                        ", isNewRecord=" + isNewRecord +
                        ", hotId='" + hotId + '\'' +
                        ", type='" + type + '\'' +
                        ", mdTitle='" + mdTitle + '\'' +
                        ", content='" + content + '\'' +
                        ", updateDate='" + updateDate + '\'' +
                        ", userId='" + userId + '\'' +
                        ", avatarUrl='" + avatarUrl + '\'' +
                        ", nickName='" + nickName + '\'' +
                        ", gender=" + gender +
                        ", birthday='" + birthday + '\'' +
                        ", fabulousCount=" + fabulousCount +
                        ", discussCount=" + discussCount +
                        ", isFabulous='" + isFabulous + '\'' +
                        ", vType='" + vType + '\'' +
                        ", uType='" + uType + '\'' +
                        ", url='" + url + '\'' +
                        '}';
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(id);
                dest.writeByte((byte) (isNewRecord ? 1 : 0));
                dest.writeString(hotId);
                dest.writeString(type);
                dest.writeString(mdTitle);
                dest.writeString(content);
                dest.writeString(updateDate);
                dest.writeString(userId);
                dest.writeString(avatarUrl);
                dest.writeString(nickName);
                dest.writeInt(gender);
                dest.writeString(birthday);
                dest.writeInt(fabulousCount);
                dest.writeInt(discussCount);
                dest.writeString(isFabulous);
                dest.writeString(vType);
                dest.writeString(uType);
                dest.writeString(url);
                dest.writeString(warrant);
                dest.writeString(isFollow);
                dest.writeString(voiceUrl);
                dest.writeInt(duration);
            }
        }
    }

    @Override
    public String toString() {
        return "CommBean{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", map=" + map +
                '}';
    }
}